<?php
// +-------------------------------------------------------------------
// |
// +-------------------------------------------------------------------
// | Copyright (c) 2009-2016 All rights reserved.
// +-------------------------------------------------------------------
namespace Service\Api\V1;

class UserInforDel
{
    public $login = true; //是否需要登录才能访问该接口
    public $title = "用户帖子删除提交ok";
    public $group = '帖子';
    public $desc = "";

    public $input = [
        'ids' => 'required;string;label=帖子id;comment=多个使用英文逗号分隔',
    ];

    public $output = [
    ];

    public function run($param, $uid)
    {

        $ret = M('user_infor')->where(['uid' => $uid,['id' =>  ['in', $param['ids']]]])->delete();
        if($ret){
            return true;
        }else{
           throw new \Exception('删除失败');
        }

    }
}
